﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BanzuDynamic.aspx.cs" Inherits="Catering.yl.Daily.BanzuDynamic" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title> 
    <link href="../../../Style/ZHJG/zhezhao.css" rel="stylesheet" type="text/css" />
    <script src="../../../Scripts/zhezhao.js" type="text/javascript"></script>
    <script src="../../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="../../../Style/center.css" />
    <script type="text/javascript">
        //保存日报信息
        function Save() {
            var hdn_useDate = $("#hdn_useDate").val();
            var hdn_currentClassID = $("#hdn_currentClassID").val();
            var hdn_currentGroupID = $("#hdn_currentGroupID").val();
            $.ajax({
                type: "Post",
                url: "BanzuDynamic.aspx/IsExists",
                data: "{'hdn_useDate':'" + hdn_useDate + "','hdn_currentClassID':'" + hdn_currentClassID + "','hdn_currentGroupID':'" + hdn_currentGroupID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.d == "OK") {//存在
                        if (!confirm("存在该日日报，是否覆盖？")) {
                            return;
                        }
                        else {
                            Save_BanzuDynamic();
                        }
                    }
                    else {
                        Save_BanzuDynamic();
                    }
                }
            });
        }
        function Save_BanzuDynamic() {
            var KitchenNum = $("#KitchenNum").val();
            if (KitchenNum=="")
            {
                alert("请填写完整的正确信息！");
                return;
             }
            var KitchenArea = $("#KitchenArea").val();
            if (KitchenArea=="")
            {
                alert("请填写完整的正确信息！");
                return;
            }
            var qiyouzao = $("#qiyouzao").val();
            if (qiyouzao == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var diancizao = $("#diancizao").val();
            if (diancizao == "")
            {
                 alert("请填写完整的正确信息！");
            return;
            }
            var penlin = $("#penlin").val();
            if (penlin == "")
            {
                alert("请填写完整的正确信息！");
                return;
            }
            var miehuoqi = $("#miehuoqi").val();
            if (miehuoqi == "")
            {
                alert("请填写完整的正确信息！");
                return;
            }
            var miehuotan = $("#miehuotan").val();
            if (miehuotan == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var shebeijiankong = $("#shebeijiankong").val();
            if (shebeijiankong == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var gaoweishebei = $("#gaoweishebei").val();
            if (gaoweishebei == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var shebeishuliang = $("#shebeishuliang").val();
            if (shebeishuliang == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var xiyishebei = $("#xiyishebei").val();
            if (xiyishebei == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var youyanji = $("#youyanji").val();
            if (youyanji == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var lengcangku = $("#lengcangku").val();
            if (lengcangku == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var dongku = $("#dongku").val();
            if (dongku == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var ganhuoku = $("#ganhuoku").val();
            if (ganhuoku == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var txt_zuoyerenshu = $("#txt_zuoyerenshu").val();
            if (txt_zuoyerenshu == "") {
                alert("请填写完整的正确信息！");
                return;
            }            
            var ddl_zuoyeleixing = $("#ddl_zuoyeleixing").val();
            var txt_zuoyezhouqi = $("#txt_zuoyezhouqi").val();
            if (txt_zuoyezhouqi == "") {
                alert("请填写完整的正确信息！");
                return;
            }
            var hdn_useDate = $("#hdn_useDate").val();
            var hdn_currentClassID = $("#hdn_currentClassID").val();
            var hdn_currentGroupID = $("#hdn_currentGroupID").val();
                $.ajax({
                    type: "Post",
                    url: "BanzuDynamic.aspx/Save_BanzuDynamic",
                    data: "{'KitchenNum':'" + KitchenNum + "','KitchenArea':'" + KitchenArea + "','qiyouzao':'" + qiyouzao + "','diancizao':'" + diancizao + "','penlin':'" + penlin + "','miehuoqi':'" + miehuoqi + "','miehuotan':'" + miehuotan + "','shebeijiankong':'" + shebeijiankong + "','gaoweishebei':'" + gaoweishebei + "','shebeishuliang':'" + shebeishuliang + "','xiyishebei':'" + xiyishebei + "','youyanji':'" + youyanji + "','lengcangku':'" + lengcangku + "','dongku':'" + dongku + "','ganhuoku':'" + ganhuoku + "','txt_zuoyerenshu':'" + txt_zuoyerenshu + "','ddl_zuoyeleixing':'" + ddl_zuoyeleixing + "','txt_zuoyezhouqi':'" + txt_zuoyezhouqi + "','hdn_useDate':'" + hdn_useDate + "','hdn_currentClassID':'" + hdn_currentClassID + "','hdn_currentGroupID':'" + hdn_currentGroupID + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d == "OK") {
                        alert("保存成功！");
                        window.location.href = window.location.href;
                    }
                    else
                    {
                        alert("请检查填写数据格式！");
                    }                        
                }
            });
        }
    </script>   
    <style type="text/css">
        .auto-style1 {
            width: 99px;
        }
        .auto-style2 {
            width: 84px;
        }
    </style>
</head>
<body style="background-color:#E5F1FD">
    <form id="form1" runat="server">
        <input type="hidden" id="hdn_useDate" value='<%=Session["useDate"]%>' />
        <input type="hidden" id="hdn_currentClassID" value='<%=Session["ClassID"]%>' />
        <input type="hidden" id="hdn_currentGroupID" value='<%=Session["GroupID"]%>' />
        <table style="width:370px; margin-right: 0px; font-size:12px" cellpadding="0" cellspacing="0" border="0" align="center"> 
            <tr>
                <td style="width:100px"></td>
                <td style="width:100px">
                </td>
                <td style="width:50px;"></td>
                <td style="width:70px"><input id="Button1" type="button" value="保存" onclick="Save()" class="input_btn_a"/></td>
                
            </tr> 
        </table>
        <table style="width:370px; margin-right: 0px; font-size:12px;" cellpadding="0" cellspacing="0" border="0" align="center" >
            <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">1.厨房状况</span></td>           
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">数量:</td>
            <td class="auto-style1"><asp:TextBox ID="KitchenNum" runat="server" Width="90px"></asp:TextBox></td>
            <td style="text-align:right">面积:</td>
            <td><asp:TextBox ID="KitchenArea" runat="server" Width="90"></asp:TextBox></td>
        </tr>  
        <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">2.热源种类</span></td>           
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">气/油灶:</td>
            <td class="auto-style1"><asp:TextBox ID="qiyouzao" runat="server" Width="90"></asp:TextBox></td>
            <td style="text-align:right">电磁灶:</td>
            <td><asp:TextBox ID="diancizao" runat="server" Width="90"></asp:TextBox></td>
        </tr>  
        <tr>
            <td style="text-align:right" class="auto-style2">喷淋系统:</td>
            <td class="auto-style1"><asp:TextBox ID="penlin" runat="server" Width="90"></asp:TextBox></td>            
        </tr>  
        <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">3.消防设备</span></td>           
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">灭火器:</td>
            <td class="auto-style1"><asp:TextBox ID="miehuoqi" runat="server" Width="90"></asp:TextBox></td>
            <td style="text-align:right">灭火毯:</td>
            <td><asp:TextBox ID="miehuotan" runat="server" Width="90"></asp:TextBox></td>
        </tr>  
        <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">4.设备监控</span></td>           
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">设备运转:</td>
            <td class="auto-style1"><asp:RadioButton ID="RB1" runat="server" AutoPostBack="True" Checked="True" GroupName="shebeiyunzhuan" OnCheckedChanged="RB1_CheckedChanged" Text="正常" /></td>
            <td><asp:RadioButton ID="RB2" runat="server" AutoPostBack="True" GroupName="shebeiyunzhuan" OnCheckedChanged="RB2_CheckedChanged" Text="异常" /></td>            
        </tr> 
        <tr>
            <td class="auto-style2"></td>
            <td colspan="3"><asp:TextBox ID="shebeijiankong" runat="server" Width="92%"></asp:TextBox></td>            
        </tr>  
        <tr>
            <td style="text-align:right" class="auto-style2">高危设备:</td>
            <td class="auto-style1"><asp:TextBox ID="gaoweishebei" runat="server" Width="90"></asp:TextBox></td>
            <td style="text-align:right">设备数量:</td>
            <td><asp:TextBox ID="shebeishuliang" runat="server" Width="90"></asp:TextBox></td>
        </tr> 
        <tr>
            <td style="text-align:right" class="auto-style2">洗衣设备:</td>
            <td class="auto-style1"><asp:TextBox ID="xiyishebei" runat="server" Width="90"></asp:TextBox></td>
            <td style="text-align:right">油烟机清洗:</td>
            <td><asp:TextBox ID="youyanji" runat="server" Width="90"></asp:TextBox></td>
        </tr> 
         <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">5.库房状态:(正常:填温度；异常:填报修内容。)</span></td>           
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">冷藏库:</td>
            <td colspan="3"><asp:TextBox ID="lengcangku" runat="server" Width="93%"></asp:TextBox></td>            
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">冻库:</td>
            <td colspan="3"><asp:TextBox ID="dongku" runat="server" Width="93%"></asp:TextBox></td>            
        </tr>
        <tr>
            <td style="text-align:right" class="auto-style2">干货库:</td>
            <td colspan="3"><asp:TextBox ID="ganhuoku" runat="server" Width="93%"></asp:TextBox></td>            
        </tr>
            <tr>
            <td colspan="4" style="padding-top:15px"><span style="color:red; font-weight:bold">(*)</span><span style="color:#000066;font-weight:bold">6.大修井作业服务装填</span></td>           
        </tr> 
            <tr>
            <td style="text-align:right" class="auto-style2">作业人数:</td>
            <td><asp:TextBox ID="txt_zuoyerenshu" runat="server" Width="93%"></asp:TextBox></td>  
            <td style="text-align:right" class="auto-style2">作业周期(天):</td>
            <td colspan="3"><asp:TextBox ID="txt_zuoyezhouqi" runat="server" Width="93%"></asp:TextBox></td>            
        </tr>
            <tr>
            <td style="text-align:right" class="auto-style2">作业类型:</td>
            <td colspan="3">
                <asp:TextBox ID="ddl_zuoyeleixing" runat="server" Width="81%"></asp:TextBox>
                <asp:Button ID="type_list" runat="server" BorderStyle="None" Text="..." Width="31px" OnClick="type_list_Click" />
                </td>            
        </tr>
        </table>

        <!--弹出层-->        
        <div runat="server" visible="false" id="main" style="border:solid 10px #898989;background:#fff;padding:30px;width:480px;z-index:1001; position: absolute;top:30%; left:50%;margin:-200px 0 0 -400px;margin-left:-25%;  padding: 0px 0px 0px 10px; width: 300px; height: 220px; margin: auto; left: 13%; top: 20%; font-size: 12px;">
            <div class="div_0207" style="width: 290px; height: 200px;">
                <h1>
                    <img src="../../../Images/cp_h1_03.gif" />添加作业类型</h1>
                <div style="width: 69%; margin: auto; height:120px">
                    <asp:CheckBoxList ID="cbl_type" runat="server" Height="56%" Width="98%" AutoPostBack="True" OnSelectedIndexChanged="cbl_type_SelectedIndexChanged">
                        <asp:ListItem>大修井</asp:ListItem>
                        <asp:ListItem>钻完井</asp:ListItem>
                        <asp:ListItem>停产检修</asp:ListItem>
                        <asp:ListItem>其它</asp:ListItem>
                    </asp:CheckBoxList>
                    <asp:TextBox ID="txt_Other" runat="server" Width="193px" Visible="false"></asp:TextBox>
                </div>                
                <table style="margin:auto;width:180px">
                    <tr>
                        <td style="text-align:left">
                            <asp:Button ID="btn_type" Width="83px" runat="server" Text="保存并返回" CssClass="input_btn_a" OnClick="btn_type_Click"/>                            
                        </td>
                        <td>
                            <asp:Button ID="btn_Close" runat="server" Text="关闭"  CssClass="input_btn_a" OnClick="btn_Close_Click"/>
                        </td>
                    </tr>
                </table>                
            </div>
        </div>
    </form>
</body>
</html>
